package com.bdult.vh.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bdult.vh.dao.BoardDAO;
import com.bdult.vh.dao.CommDAO;
import com.bdult.vh.vo.BoardVO;

@Service
public class BoardService {
	@Autowired
	private BoardDAO dao;
	
	@Autowired
	private CommDAO commDAO;
	
	public ArrayList<HashMap<String, Object>> noticeList(Map<String, Object> paramMap) {
		return dao.noticeList(paramMap);
	}
	
	public ArrayList<HashMap<String, Object>> noticeList_event(Map<String, Object> paramMap) {
		return dao.noticeList_event(paramMap);
	}
	
	public HashMap<String, Object> getboardTypeDetail(String boardTypeId) {
		return dao.getboardTypeDetail(boardTypeId);
	}
	
	public void insertBoard(BoardVO vo) {
		commDAO.updateSequence("TBLBOARD.BOARDID");
		long nMaxNo = commDAO.selectSequence("TBLBOARD.BOARDID");
		vo.setBoardid(nMaxNo);
		dao.insertBoard(vo);
	}
	
	
}
